package net.esj.basic.expression.condition.logic;

import net.esj.basic.expression.ExpressionException;
import net.esj.basic.expression.condition.Condition;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Scope("prototype")
@Component("orCondition")
public class ConditionLogicOr extends  AbstractConditionLogic {

	
	
	public ConditionLogicOr() {
		super();
	}


	@Override
	public boolean passed(Number num) throws ExpressionException {
		for (Condition c : conditions)
		{
			if (c.passed(num))
				return true;
		}
		return false;
	}

}
